from django.apps import AppConfig
import logging

# 配置日志
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('config_app')


class ConfigAppConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'config_app'
    
    def ready(self):
        """应用启动时初始化"""
        logger.info('配置应用已启动')
        
        # 导入并初始化调度器
        from .agent_runner_views import start_scheduler
        # start_scheduler()
